home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_sea_engineroom_ai.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  104 lines

  1.  
  2. # Jones 3D Cog Script
  3. #
  4. # SEA_EngineRoom_AI.cog
  5. # Manages wpnt mode for the commies in the Engine Room of the Pudovkin
  6. #
  7. # [JM]
  8. #
  9. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ========================================================================================
  12.  
  13. symbols
  14.  
  15. message         startup
  16. message         crossed
  17. message         killed
  18.  
  19. # =================== REFERENCES ===============================
  20.  
  21. thing           Commie00            LinkID=1
  22. thing           Commie01            LinkID=1
  23. thing           Commie02            LinkID=1
  24.  
  25. surface         AdjoinAIOn0         LinkID=2
  26. surface         AdjoinAIOn1         LinkID=2
  27. surface         AdjoinAIOn2         LinkID=2
  28.          
  29. surface         AdjoinAIOff0        LinkID=3 
  30. surface         AdjoinAIOff1        LinkID=3
  31. surface         AdjoinAIOff2        LinkId=3
  32.  
  33. # ===================== MISC LOCAL VARIABLES ===================
  34.  
  35. AI          AI_Sniper=com_2Hsniper.ai   local
  36.  
  37. int         counter             local
  38. int         TempCommie          local
  39.  
  40. # ==================== CONSTANTS ==========================
  41.  
  42. int         NUMBER_OF_COMMIES=3         local
  43.  
  44.  
  45. end
  46.  
  47. # ======================= CODE =============================
  48. code
  49.  
  50. # =========================================================
  51. startup:
  52.             if(commie01 != -1)
  53.         {
  54.             AISetClass(Commie01, AI_sniper);
  55.         }            
  56.  
  57.     return;
  58.     
  59. # =========================================================
  60. crossed:
  61.     
  62.     if(GetSenderID() == 2)
  63.     {
  64.         for(counter = 0; counter < NUMBER_OF_COMMIES; counter = counter + 1) 
  65.         {
  66.             if(Commie00[counter] != -1)
  67.                 AISetInstinctWpntMode(Commie00[counter]);
  68.         }
  69.     }
  70.     else if(GetSenderID() == 3)
  71.     {
  72.         for(counter = 0; counter < NUMBER_OF_COMMIES; counter = counter + 1)
  73.         {
  74.             if(Commie00[counter] != -1)
  75.                 AIClearInstinctWpntMode(Commie00[counter]);
  76.         }
  77.     }
  78.     
  79.     return;
  80.     
  81. # =========================================================
  82. killed:
  83.  
  84.     if(GetSenderID() == 1)
  85.     {
  86.         TempCommie = GetSenderRef();
  87.         
  88.         for(counter = 0; counter < NUMBER_OF_COMMIES; counter = counter + 1)
  89.         {
  90.             if(Commie00[counter] == TempCommie)
  91.             {
  92.                 Commie00[counter] = -1;
  93.             }
  94.         }
  95.     }
  96.     
  97.     return;
  98.  
  99. # ============================================================
  100.  
  101. end
  102.